<extend name="Public:base" />
<block name="title"><title>后台管理 | 编辑用户</title></block>

<block name="css">
<link rel="stylesheet" type="text/css" href="__CSS__/select2_metro.css" />

<link rel="stylesheet" type="text/css" href="__CSS__/chosen.css" />
</block>

<block name="sidebarmenu">
	<li class="start">

		<a href="__APP__">

		<i class="icon-home"></i> 

		<span class="title">管理首页</span>

		</a>

	</li>

	<li class="">

		<a href="javascript:;">

		<i class="icon-cogs"></i> 

		<span class="title">系统设置</span>

		<span class="arrow "></span>

		</a>

		<ul class="sub-menu">

			<li >

				<a href="layout_horizontal_sidebar_menu.html">

				数据库设置</a>

			</li>

		</ul>

	</li>

	<li class="">

		<a href="javascript:;">

		<i class="icon-bookmark-empty"></i> 

		<span class="title">文章管理</span>

		<span class="arrow "></span>

		</a>

		<ul class="sub-menu">

			<li >

				<a href="{:U('Article/artList')}">

				文章列表</a>

			</li>

			<li >

				<a href="{:U('Article/addArt')}">

				添加文章</a>

			</li>

			<li>

				<a href="{:U('Article/cateList')}">

				分类列表</a>

			</li>

			<li class="">

				<a href="{:U('Article/addCate')}">

				添加分类</a>

			</li>

		</ul>

	</li>

	<li class="active">

		<a href="javascript:;">

		<i class="icon-user"></i> 

		<span class="title">用户管理</span>

		<span class="arrow "></span>

		</a>

		<ul class="sub-menu">

			<li class="active">

				<a href="{:U('User/userlist')}">

				用户列表</a>

			</li>
			<li>

				<a href="{:U('User/addUser')}">

				添加用户</a>

			</li>

			<li class="">

				<a href="{:U('User/editPass')}">

				修改密码</a>

			</li>

		</ul>

	</li>

	<li class="">

		<a href="javascript:;">

		<i class="icon-th"></i> 

		<span class="title">Data Tables</span>

		<span class="selected"></span>

		<span class="arrow open"></span>

		</a>

		<ul class="sub-menu">

			<li class="">

				<a href="table_basic.html">

				Basic Tables</a>

			</li>

		</ul>

	</li>
</block>

<block name="page-title">				
	<h3 class="page-title">
		博客系统 <small>系统概况</small>
	</h3>
	<ul class="breadcrumb">
		<li>
			<i class="icon-home"></i>
			<a href="__APP__">主页</a> 
			<i class="icon-angle-right"></i>
			<a href="{:U('User/userlist')}">用户管理</a> 
			<i class="icon-angle-right"></i>
			<a href="{:U('User/userlist')}">编辑用户</a> 
		</li>
	</ul>
</block>
						
<block name="page-content">
<div class="row-fluid">

	<div class="span12">

		<!-- BEGIN VALIDATION STATES-->

		<div class="portlet box purple">

			<div class="portlet-title">

				<div class="caption"><i class="icon-reorder"></i>编辑用户</div>

				<div class="tools">

					<a href="javascript:;" class="collapse"></a>

					<a href="#portlet-config" data-toggle="modal" class="config"></a>

					<a href="javascript:;" class="reload"></a>

					<a href="javascript:;" class="remove"></a>

				</div>

			</div>

			<div class="portlet-body form">

				<!-- BEGIN FORM-->

				<h3>请填写正确的用户信息</h3>

				<form action="{:U('doEditUser')}" method="post" id="form_sample_2"  class="form-horizontal">

					<div class="alert alert-error hide">

						<button class="close" data-dismiss="alert"></button>

						信息有错，亲，核对一下哦！

					</div>

					<div class="alert alert-success hide">

						<button class="close" data-dismiss="alert"></button>

						对了，对了！走起！

					</div>

					<div class="control-group">

						<label class="control-label">用户名<span class="required">*</span></label>

						<div class="controls">
							<input type="hidden" name="id" value="{$editUser.id}">

							<input type="text" name="username" data-required="1" class="span6 m-wrap" value="{$editUser.username}"/>

						</div>

					</div>
					<div class="control-group">

						<label class="control-label">性别<span class="required">*</span></label>

						<div class="controls">

							<label class="radio line">

							<input type="radio" name="sex" value="1" {$editUser['sex'] == 1 ? 'checked':''}/>

							男

							</label>

							<label class="radio line">

							<input type="radio" name="sex" value="0" {$editUser['sex'] ==1? '':'checked'}//>

							女

							</label> 

							<div id="form_2_membership_error"></div>

						</div>

					</div>

					<div class="control-group">

						<label class="control-label">邮箱<span class="required">*</span></label>

						<div class="controls">

							<input name="mail" type="text" class="span6 m-wrap" value="{$editUser.mail}"/>

						</div>

					</div>

					<div class="control-group">

						<label class="control-label">用户组<span class="required">*</span></label>

						<div class="controls">

							<select class="span6 m-wrap" name="group">

								<volist name="group" id="gp">
								<option value="{$gp.id}" {$editUser['group']==$gp['id']?"selected='selected'":""}>
									{$gp.name}
								</option>
								</volist>

							</select>

						</div>

					</div>

					

					<div class="form-actions">

						<button type="submit" class="btn purple">保存</button>

						<button type="button" class="btn" onclick="window.history.back(-1);">返回</button>

					</div>

				</form>

				<!-- END FORM-->

			</div>

		</div>

		<!-- END VALIDATION STATES-->

	</div>

</div>

</block> 

<block name="script">
<script type="text/javascript" src="__JS__/jquery.validate.min.js"></script>

<script type="text/javascript" src="__JS__/additional-methods.min.js"></script>

<script type="text/javascript" src="__JS__/select2.min.js"></script>

<script type="text/javascript" src="__JS__/chosen.jquery.min.js"></script>
<script src="__JS__/form-validation.js"></script> 
	<script>

		jQuery(document).ready(function() {       

		   // initiate layout and plugins

		   App.init();
		   FormValidation.init();

		});

	</script>
</block>